#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include <string.h>
int jiujiu()
{
	int input = 0;
	while (scanf("%d", &input) != EOF) 
	{
		for (int i = 1; i <= input; i++)
		{
			for (int j = 1; j <= i; j++)
			{
				printf("%d*%-2d=%-3d  ", j, i, j * i);
			}
			printf("\n");
		}
	}
	return 0;
}
int bin_search(int arr[10], int k, int left, int right)
{
	while (left <= right)
	{
		int mid = left + (right - left) / 2;
		if (arr[mid] == k)
		{
			return mid + 1;
		}
		else if (arr[mid] > k)
		{
			right = mid - 1;
		}
		else
		{
			left = mid + 1;
		}
	}
	return -1;
}
int banduanrunnian(int year)
{
	if ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0))
		return 1;
	else
		return 0;
}
int is_prime(int a)
{
	int flag = 0;
	for (int i = 2; i <= a - 1; i++)
	{
		if (a % i == 0)
		{
			flag = 1;
			break;
		}
	}
	if (flag == 0)
		return a;
	else
		return 0;
}

int init(int arr2[7])
{
	
	for (int i = 0; i < 7; i++)
	{
		arr2[i] = 0;
	}
	return 0;
}
int print(int arr1[7])
{
	
	for (int i = 0; i < 7; i++)
		printf("%d", arr1[i]);
	return 0;
	
}
int reverse(int arr3[7])
{
	int left = 0;
	int right = 7;
	
	while(left <= right)
	{
		int temp = arr3[right];
		arr3[right] = arr3[left];
		arr3[left] = temp;
		left++;
		right--;
	}
	return 0;
}